/**
 * Created by shengjian.lin on 17-5-6.
 */

function error(vue) {
    return {
        service: function () {
            vue.$message.error('服务响应错误');
        },
        business: function (msg) {
            vue.$message.error(msg);
        }
    }
}

Math.add = function (num1,num2,digit) {
    var m = Math.pow(10, digit);
    return parseInt((num1 * m + num2 * m), 10) / m;
};
Math.sub = function (num1,num2,digit) {
    var m = Math.pow(10, digit);
    return parseInt((num1 * m - num2 * m), 10) / m;
};